import {delAreaRs,listAreaRs,saveOrUpdateAreaRs,listAreaNodesByPid } from '../services/areaRs';

export default {
  namespace: 'areaRs',

  state: {

  },

  effects: {
    *listAreaRs({ payload,callback }, { call, put }) {
      const response = yield call(listAreaRs, payload);
      if (callback) callback(response);
    },
    *delAreaRs({ payload,callback }, { call, put }) {
      const response = yield call(delAreaRs, payload);
      if (callback) callback(response);
    },
    *saveOrUpdateAreaRs({ payload,callback }, { call, put }) {
      const response = yield call(saveOrUpdateAreaRs, payload);
      if (callback) callback(response);
    },
    *listAreaNodesByPid({ payload,callback }, { call, put }) {
      const response = yield call(listAreaNodesByPid, payload);
      if (callback) callback(response);
    },
  },

  reducers: {

  },
};
